package com.csdn.exer;

import redis.clients.jedis.Jedis;

public class RedisUtil {

    private static Jedis redisClient;

    public static Jedis getInstance() {
        if (redisClient == null) {
            redisClient = new Jedis("127.0.0.1");
        }
        return redisClient;
    }

//    public static void main(String[] args) {
//        RedisUtil redisUtil = new RedisUtil();
//        redisUtil.redisClient.set("1", "hello");
//        String v = redisUtil.redisClient.get("1");
//        System.out.println(v);
//    }
}
